import request from '@/utils/request'
// 列表
export function GetListAPI(params) {
  return request({
    url: '/storage/sales-return/list',
    method: 'GET',
    params
  })
}

// 新增
export function AddDataAPI(data) {
  return request({
    url: '/storage/sales-return/add',
    method: 'POST',
    data
  })
}

// 入库/送检
export function WarehousInspectionAPI(data) {
  return request({
    url: '/storage/purchase-receipt/warehousInspection',
    method: 'POST',
    data
  })
}

// 关结
export function CloseAPI(data) {
  return request({
    url: '/storage/sales-return/close',
    method: 'POST',
    data
  })
}

// 修改
export function EditDataAPI(data) {
  return request({
    url: '/storage/sales-return/update',
    method: 'POST',
    data
  })
}

// 删除
export function DelDataAPI(data) {
  return request({
    url: '/storage/sales-return/delete/' + data,
    method: 'DELETE'
  })
}

// 查看
export function GetDailtAPI(data) {
  return request({
    url: '/storage/sales-return/view/' + data,
    method: 'GET'
  })
}

// 明细
export function GetDetailListAPI(params) {
  return request({
    url: '/storage/sales-return-detail/list',
    method: 'GET',
    params
  })
}

// 销售发货列表查询
export function GetPickingSaleListAPI(params) {
  return request({
    url: '/storage/pickingSale/list',
    method: 'GET',
    params
  })
}

/**
 * 金蝶云拉取销售订单
 * @param {*} data
 * @returns
 */
export function getJinDieSaleAPI(data) {
  return request({
    url: '/storage/sales-return/getPullSalesReturn',
    method: 'PUT',
    data
  })
}

// 金蝶云拉取日期回显
export function getPullViewAPI(params) {
  return request({
    url: '/storage/sales-return/getPullView',
    method: 'GET',
    params
  })
}
